package com.igor.bookStore.util;

import java.io.IOException;

import org.apache.tapestry5.annotations.ApplicationState;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Response;

import com.igor.bookStore.inface.User;

public class LoginCheck {
	
	 @ApplicationState
     private User user;
     private boolean userExists;

     public User getUser() {
             return this.user;
     }

     @Inject
     private Response response;

     public String getCheckUserExists() throws IOException {
             if (!userExists) {
                     response.sendRedirect("login");
             }
             return "";
     }


}
